package edu.pk.mc.breakthebrick;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;

public class GameActivity extends Activity {
	private MusicService bgmusic = new MusicService();
    private Intent svc;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Intent i=getIntent();
		String name=i.getStringExtra("level");
		if(name.equals("BEGINNER"))
			setContentView(R.layout.activity_game);
		else if(name.equals("INTERMEDIATE"))
			setContentView(R.layout.level2);
		else if(name.equals("EXPERT"))
			setContentView(R.layout.level3);
		
		svc=new Intent(this,MusicService.class);
		startService(svc);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		//getMenuInflater().inflate(R.menu.game, menu);
		return true;
	}
	protected void onPause()
	{
		stopService(svc);
		
	}

    protected void onStop()
    {
    	stopService(svc);
    	
    }

}
